//目前暂时有二分查找
#include<stdio.h>
#define NUM 9
int MyBinarySearch(int search_num,int search_arry[NUM])
{
   int left=0,right=NUM-1,mid=0;
   while(left<=right)
   {
    mid=(left+right)/2;
    if(search_num==search_arry[mid])
    {
        return mid;
    }
    if(search_num>search_arry[mid])
    {
        left=mid+1;
        continue;
    }
    if(search_num<search_arry[mid])
    {
        right=mid-1;
        continue;
    }
   }
   return -1;
}




int main()
{
    int search_num=12,search_array[NUM]={2,4,6,8,10,12,14,16,18,};
    MyBinarySearch(search_num,search_array);
    return 0;
}
